﻿namespace Harness.Recording.LocateParsers
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using mshtml;

    internal class IdLocateParseBehavior : LocateParser.ILocateParseBehavior
    {
        public string Parse(IHTMLElement element)
        {
            if (string.IsNullOrWhiteSpace(element.id))
            {
                return string.Empty;
            }

            return string.Format("#{0}", element.id);
        }
    }
}
